package com.shujia.userprofile.info.platform

import com.shujia.util.SparkRunner
import org.apache.spark.sql.{DataFrame, SparkSession}

object ChannelUserTag extends SparkRunner {
  fieldName = "channel"

  override def fetchTgg(spark: SparkSession, ds: String): DataFrame = {
    spark.sql(
      s"""
         |select
         | id,
         | case
         | when member_channel= 1 then 'IOS'
         | when member_channel= 2 then 'android'
         | when member_channel= 3 then '微信小程序'
         | when member_channel= 4 then 'IO微信公众号S'
         | else 'h5' end as channel
         | from
         |dim.dim_pub_user_info_d_f
         |where ds='$ds'
         |
         |""".stripMargin)
  }
}
